package com.qf.openapi.web.master.controller;

import cn.hutool.captcha.CaptchaUtil;
import cn.hutool.captcha.LineCaptcha;
import com.qf.openapi.web.master.dao.ApiMappingDao;
import com.qf.openapi.web.master.entity.ApiMapping;
import com.qf.openapi.web.master.entity.User;
import com.qf.openapi.web.master.service.ApiMappingSevice;
import com.qf.openapi.web.master.service.UserSevice;
import com.qf.openapi.web.master.vo.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;


@RestController
@RequestMapping("/sys/api_mapping")
@Slf4j   // 添加该注解后，可以使用 log对象进行日志的打印
public class ApiMappingController {

	@Autowired
	private ApiMappingSevice apiMappingSevice;

	@Autowired
	private UserSevice userSevice;



	/*hutool工具类
	 * 返回验证码
	 * */
	@GetMapping("/table")
	public TableVo gitApiMapping(Integer page,Integer limit) throws IOException {
		TableVo< ApiMapping > apiMappings=apiMappingSevice.getApiMappings( page,limit );
		log.info( "返回的数据,${}",apiMappings );
		return apiMappings;
	}



}
